<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="s" uri="/struts-tags"%>

<table class="table" id="phoneList">
    <caption><fmt:message key="phoneList.heading"/></caption>
    <thead>
        <tr>
            <th class="hidden"/>
            <th><fmt:message key="phone.type"/></th>
            <th><fmt:message key="phone.number"/></th>
            <th class="hidden"/>
        </tr>
    </thead>
    <tbody>
        <s:if test="phoneList.size > 0">
            <s:iterator value="phoneList" status="status">
                <tr class="<s:if test="#status.even">even</s:if><s:else>odd</s:else>" onclick="editPhone(this);" style="cursor: pointer;">
                    <td class="hidden"><s:property value="id" /></td>
                    <td><s:property value="type" /></td>
                    <td><s:property value="number" /></td>
                    <td class="hidden"><s:property value="person.id" /></td>
                </tr>
            </s:iterator>
        </s:if>
        <s:else>
            <tr class="empty"><td colspan="4"><fmt:message key="empty" /></td></tr>
        </s:else>
    </tbody>
</table>